<template>
  <el-input type="textarea" :resize="resize" :rows="rows" v-bind="$attrs" v-on="$listeners" clearable :autosize="autosize" show-word-limit></el-input>
</template>

<script>
  export default {
    name: "my-textarea",
    props: {
      /** 默认大小mini **/
      size:{
        type: String,
        default: 'mini'
      },
      /** 默认3行,如果需要修改需要设置autosize = false **/
      rows: {
        type: Number,
        default: 3
      },
      /** 大小自适应 **/
      autosize: {
        type: [Boolean,Object],
        default: ()=>{
          return { minRows: 3 }
        }
      },
      /** 默认不能被缩放 **/
      resize:{
        type: String,
        default: 'none'
      }
    },
  }
</script>

<style scoped>

</style>
